package svgedit.japangui.actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import svgedit.japangui.JapanFrame;

@SuppressWarnings("serial")
public class UndoAction extends AbstractAction {

	JapanFrame frame;
	
    public UndoAction(JapanFrame japanFrame) {
        super("\u5143\u306B\u623b\u3059");
        this.frame = japanFrame;
       ;
    }
	
	
	@Override
	public void actionPerformed(ActionEvent e) {
	
		frame.getView().undoManager.undo();
        frame.undoAction.setEnabled(frame.getView().undoManager.canUndo());
        frame.redoAction.setEnabled(frame.getView().undoManager.canRedo());

		frame.getView().repaint();
		}
	

}
